# $Id: PKGBUILD 81808 2012-12-31 06:01:24Z bgyorgy $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Doehni <dohny@gmx.de>

pkgname=gnome-do-plugins
pkgver=0.8.4
pkgrel=5
pkgdesc="Plugins for gnome-do"
arch=('any')
url="http://do.davebsd.com/"
license=('GPL3')
depends=('gnome-do>=0.9' 'flickrnet' 'gdata-sharp' 'wnck-sharp')
makedepends=('intltool' 'libgnome-sharp')
source=(http://launchpad.net/do-plugins/trunk/$pkgver/+download/$pkgname-$pkgver.tar.gz
        flickrnet-3.2.patch
        use-dbus-sharp.patch
        use-dmcs.patch
        systemd-support.patch)
md5sums=('092b51b27463dc2beee65779d95a0ff1'
         '8222b36baf39657d8f4e4c214f124093'
         'eeaf4ab3521bbd6084da95f08e6d14d8'
         '07bd0ad4d1c4bddf5dd28a08b4424e61'
         '2a7f48ec6a06b38103538ad2f05a6ec7')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  patch -Np1 -i "$srcdir/flickrnet-3.2.patch"
  patch -Np1 -i "$srcdir/use-dbus-sharp.patch"
  patch -Np0 -i "$srcdir/use-dmcs.patch"
  patch -Np1 -i "$srcdir/systemd-support.patch"

  autoreconf -fi
  ./configure --prefix=/usr --enable-release \
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install

  # Remove AptURL plugin, because we don't have apt
  rm "$pkgdir"/usr/lib/gnome-do/plugins/AptURL.dll*

  # Remove Disk Mounter plugin to avoid deprecated gnome-vfs-sharp dependency
  rm "$pkgdir"/usr/lib/gnome-do/plugins/DiskMounter.dll*
}
